package com.iias.communication.enums;


import com.iias.communication.codec.AbstractCodec;
import com.iias.communication.codec.string.StringCodec;

/**
 * 协议拟定
 */
public enum  Protocol {

    COMMON_STRING(1,"普通字符串协议",new StringCodec());


    Protocol(Integer version, String name, AbstractCodec decode) {
        this.version = version;
        this.name = name;
        this.decode = decode;
    }

    /**
     * 版本号
     */
    private Integer version;
    /**
     * 协议名称
     */
    private String name;

    private AbstractCodec decode;

    public AbstractCodec getDecode() {
        return decode;
    }

    public void setDecode(AbstractCodec decode) {
        this.decode = decode;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }
}
